\documentclass[10pt,fleqn]{article}
\usepackage{times}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{algorithmic}
\usepackage{algorithm}
\setlength{\parindent}{0in}
\setlength{\parskip}{0.1in}
\begin{document}

%\thispagestyle{empty}

\begin{center}
{\large{\bf Main Algorithm Pseudocode}}\\
{\large{\bf March 1, 2011}}
\end{center}

\textsc{Algorithm MAIN}
\\
\textbf{Input: }$populationSize$ ,$maxGenerations$ ,$scoreThreshold$
\\
\textbf{Output: }Graphical plot data for the best cell at each scored generation

\begin{algorithmic}[1]

\FOR{$i$ = 1 .. $populationSize$}
	\STATE $population.addNewCell(initialParameters)$
\ENDFOR
\STATE
\FOR{$generation$ = 1 .. $maxGenerations$ \do}
	\FORALL{$cell$ \textbf{in} $population$ \do}
		\STATE $mutationType \gets randomMutationType()$
		\STATE $cell.transform(mutationType)$
	\ENDFOR
	\STATE  
	\IF {$generation \% scoreThreshold = 0$}
		\STATE $bestCell \gets NULL$
		\STATE $bestScore \gets NULL$
		\FORALL{$cell$ \textbf{in} $population$}
			\STATE $plotData \gets cell.rungeKutta(standardStepSize)$
			\STATE $score \gets scoringFunction(plotData)$
			\IF {$score > bestScore$}
				\STATE $bestScore \gets score$
				\STATE $bestCell \gets cell$
			\ENDIF
		\ENDFOR
		\STATE
		\STATE $plotData \gets bestCell.rungeKutta(bestCellStepSize)$
		\STATE $saveToFile(generation,bestCell,plotData)$
		\STATE 	
	\ENDIF
\ENDFOR



\end{algorithmic}


\end{document}
